package mmc.server.shell.ops.constant;

import mmc.server.shell.*;
import mmc.server.shell.ops.Constant;

public class Value extends Constant {

    double value;

    public Value(String text) throws ShellException {
        super(text);
        try {
            value = Double.parseDouble(text);
        } catch (Exception e) {
            throw new OperationNotAcceptedException(false, "No value: " + e.getMessage());
        }
    }

    @Override
    public double execute() {
        return value;
    }
    
    public static boolean hideInDescription(){
    	return true;
    }
}
